Block packaging method based on blockchain transaction and electronic device using the same

ABSTRACT

A block packaging method based on blockchain transaction is used in an electronic device. The electronic device controls each node in the blockchain to receive and store a blockchain transaction, and calculate a hash value of the each node according to the blockchain transaction, generate a package voting information according to the hash value of the each node, and send the package voting information to a voted node. The electronic device further controls the each node to record the number of votes as the voted nodes according to the package voting information to obtain the number of votes of the each node, take the node with the largest number of votes as a target node according to the number of votes, and pack the blockchain transaction into blocks and broadcast the blocks to all nodes in the blockchain.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No.202011541034.3 filed on Dec. 23, 2020, the contents of which areincorporated by reference herein.

FIELD

The subject matter herein generally relates to a field of blockchain,and especially relates to a block packaging method based on blockchaintransaction and an electronic device.

BACKGROUND

In a decentralized blockchain network, each node of the blockchainnetwork follows a set of consensus algorithms to define block'spackaging authority. The node with the block's packaging authoritytransmits the packed block to all nodes by broadcasting. After receivingthe broadcasted block, other nodes first verify the validity of thebroadcasted block, and then write the valid block into the blockchain.The existing proof of work (POW) consensus algorithm makes all nodes inthe blockchain network must spend a lot of computing resources tocalculate a hash value in order to determine which node obtains block'spackaging authority.

BRIEF DESCRIPTION OF THE DRAWINGS

Implementations of the present disclosure will now be described, by wayof embodiment, with reference to the attached figures.

FIG. 1 is a flowchart of one embodiment of a block packaging methodbased on blockchain transaction.

FIG. 2 is a block diagram of one embodiment of a block packaging devicebased on blockchain transaction.

FIG. 3 is a schematic diagram of one embodiment of an electronic device.

DETAILED DESCRIPTION

It will be appreciated that for simplicity and clarity of illustration,where appropriate, reference numerals have been repeated among thedifferent figures to indicate corresponding or analogous elements. Inaddition, numerous specific details are set forth in order to provide athorough understanding of the embodiments described herein. However, itwill be understood by those of ordinary skill in the art that theembodiments described herein can be practiced without these specificdetails. In other instances, methods, procedures, and components havenot been described in detail so as not to obscure the related relevantfeature being described. Also, the description is not to be consideredas limiting the scope of the embodiments described herein. The drawingsare not necessarily to scale and the proportions of certain parts may beexaggerated to better illustrate details and features of the presentdisclosure.

The present disclosure, including the accompanying drawings, isillustrated by way of examples and not by way of limitation. Severaldefinitions that apply throughout this disclosure will now be presented.It should be noted that references to “an” or “one” embodiment in thisdisclosure are not necessarily to the same embodiment, and suchreferences mean “at least one”.

The term “module”, as used herein, refers to logic embodied in hardwareor firmware, or to a collection of software instructions, written in aprogramming language, such as, Java, C, or assembly. One or moresoftware instructions in the modules can be embedded in firmware, suchas in an EPROM. The modules described herein can be implemented aseither software and/or hardware modules and can be stored in any type ofnon-transitory computer-readable medium or other storage device. Somenon-limiting examples of non-transitory computer-readable media includeCDs, DVDs, BLU-RAY, flash memory, and hard disk drives. The term“comprising” means “including, but not necessarily limited to”; itspecifically indicates open-ended inclusion or membership in aso-described combination, group, series, and the like.

An image defect detection method is illustrated in the disclosure. Themethod is applied in one or more electronic devices. The electronic canautomatically perform numerical calculation and/or informationprocessing according to a number of preset or stored instructions. Thehardware of the electronic device includes, but is not limited to amicroprocessor, an Application Specific Integrated Circuit (ASIC), aField Programmable Gate Array (FPGA), a Digital signal processor (DSP),or an embedded equipment, etc.

In one embodiment, the electronic device can be a desktop computer, anotebook computer, a tablet computer, a cloud server or other computingdevices. The device can carry out a human-computer interaction with userby a keyboard, a mouse, a remote controller, a touch pad or a voicecontrol device.

FIG. 1 illustrates the block packaging method based on blockchaintransaction. The method is applied in the electronic device 6 (referringto FIG. 3). The method is provided by way of example, as there are avariety of ways to carry out the method. Each block shown in FIG. 1represents one or more processes, methods, or subroutines carried out inthe example method. Furthermore, the illustrated order of blocks is byexample only and the order of the blocks can be changed. Additionalblocks may be added or fewer blocks may be utilized, without departingfrom this disclosure. The example method can begin at block 11.

At block 11, each node in the blockchain receiving and storing ablockchain transaction.

In one embodiment, newly generated blockchain transaction is broadcastto all nodes in the blockchain by a peer-to-peer (P2P) network. The eachnode in the blockchain receives the blockchain transaction by thepeer-to-peer network and stores the blockchain transaction in a localtransaction pool of the each node. For example, after any one node inthe blockchain generates a new blockchain transaction, the blockchaintransaction is broadcast to all nodes in the blockchain by thepeer-to-peer network. After receiving the blockchain transactionbroadcast by the corresponding node, the each node in the blockchainstores the blockchain transaction in the local transaction pool of eachnode.

At block 12, the each node calculating a hash value of the each nodeaccording to the blockchain transaction, generating a package votinginformation according to the hash value of the each node, and sendingthe package voting information to a voted node, and the package votinginformation including a digital signature of the each node and an uniqueidentification code of the voted node.

In one embodiment, the blockchain transaction is a transactioncombination including a number of transactions. In one embodiment, dueto transmission delay influence of the P2P network, the blockchaintransaction received by the each node in the blockchain may be the sameor different, that is, the transactions in the transaction combinationreceived by each node in the blockchain may be the same or different. Inone embodiment, when two nodes in the blockchain receive the sameblockchain transaction, the hash values calculated by the two nodes arethe same. When two nodes of the blockchain receive different blockchaintransactions, the hash values calculated by the two nodes are different.

In one embodiment, the each node calculating a hash value of the eachnode according to the blockchain transaction and generating a packagevoting information according to the hash value of the each node andsending the package voting information to a voted node includes:calculating the hash value of each transaction in the transactioncombination received by the each node, making the hash values of thetransactions XOR with each other to obtain the hash value of the eachnode; respectively making the hash value of the each node XOR with anunique identification code of all nodes of the blockchain to obtain XORdistance values between the each node and all nodes of the blockchain;determining a minimum XOR distance value between the each node and allnodes of the blockchain; taking the node corresponding to the minimumXOR distance as the voted node in the package voting information of theeach node; and the each node sending the package voting information tothe voted node.

For example, the blockchain includes four nodes: node X, node Y, node Zand node U. The unique identification code of node X is 0xF000, theunique identification code of node Y is 0x0F00, the uniqueidentification code of node Z is 0x00F0, and the unique identificationcode of node U is 0x000F, and F represents the number F in hexadecimal.The blockchain transaction includes one or more of the transaction A,the transaction B and the transaction C. The hash value of thetransaction A is calculated as 0x0FFF, the hash value of the transactionB is calculated as 0xF0FF and the hash value of the transaction C iscalculated as 0xFF0F. When the blockchain transaction received by thenode X includes the transaction A, the transaction B and the transactionC, the node X performs XOR operation on the hash values of thetransaction A, the transaction B and the transaction C, that is, 0x0FFF⊕ 0xF0FF ⊕ 0xFF0F to obtain the hash value of the node X as 0x000F. Whenthe blockchain transaction received by the node Y includes thetransaction A, the transaction B and the transaction C, the node Yperforms XOR operation on the hash values of the transaction A, thetransaction B and the transaction C, that is, 0x0FFF ⊕ 0xF0FF ⊕ 0xFF0Fto obtain the hash value of the node Y as 0x000F. When the blockchaintransaction received by the node Z includes the transaction A and thetransaction B, the node Z performs XOR operation on the hash values ofthe transaction A and the transaction B, that is, 0x0FFF ⊕ 0xF0FF toobtain the hash value of the node Y as 0xFF00. When the blockchaintransaction received by the node U includes the transaction B and thetransaction C, the node U performs XOR operation on the hash values ofthe transaction B and the transaction C, that is, 0xF0FF ⊕ 0xFF0F toobtain the hash value of the node U as 0x0FF0. The Node X performs XORoperation on the hash value of the node X with the unique identificationcodes of the node X, the node Y, the node Z and the node U respectively.The XOR distance between the node X and the node X is 61455, the XORdistance between the node X and the node Y is 3855, the XOR distancebetween the node X and the node Z is 255, and the XOR distance betweenthe node X and the node U is 0. As the XOR distance between the node Xand the node U is the smallest, the node X takes the node U as the votednode in the package voting information of the node X, and the node Xsends the package voting information to the node U. The process by whichthe remaining nodes Y, Z and U in the blockchain determine the votednodes in their respective package voting information is the same as thatby which the node x determines the voted nodes in the package votinginformation nodes.

In one embodiment, the each node in the blockchain calculates the hashvalue of the each node according to the blockchain transaction within apreset time period, generating the package voting information accordingto the hash value of the each node, and sending the package votinginformation to the voted node. In one embodiment, the preset time periodis 10 seconds

At block 13, the each node recording the number of votes as the votednodes according to the package voting information to obtain the numberof votes of the each node.

In one embodiment, the each node recording the number of the voted nodesaccording to the package voting information to obtain the number ofvotes of the each node includes: the each node generating the packagevoting information according to the number of votes as the voted node,the unique identification code as the voted node and a verificationinformation; and broadcasting the package voting information to allnodes in the blockchain.

At block 14, the each node taking the node with the largest number ofvotes as a target node according to the number of votes.

At block 15, the target node packing the blockchain transaction intoblocks and broadcasting the blocks to all nodes in the blockchain.

In one embodiment, the target node packs the blockchain transaction intoblocks and broadcasts the blocks to all nodes in the blockchain by theP2P network.

In the present disclosure, the each node takes the node with the largestnumber of votes as the target node, and the target node packages thereceived blockchain transaction into blocks and broadcasts them to allnodes in the blockchain, so as to avoid a problem that a proof consensusalgorithm consumes a lot of computing resources when determining theblock's packaging authority.

FIG. 2 illustrates a block packaging device 30 based on blockchaintransaction. The block packaging device 30 is applied in the electronicdevice 6. In one embodiment, according to the functions it performs, theblock packaging device 30 can be divided into a plurality of functionalmodules. The functional modules perform the blocks 11-15 in theembodiment of FIG. 1 to perform the functions of packaging blocks.

In one embodiment, the block packaging device 30 includes, but is notlimited to, a transaction receiving module 301, a voting module 302, avote counting module 303 and a packaging module 304. The modules 301-304of the block packaging device 30 can be collections of softwareinstructions. In one embodiment, the program code of each programsegment in the software instructions can be stored in a storage andexecuted by at least one processor to perform the function of packagingblocks.

The transaction receiving module controls each node in the blockchain toreceive and store a blockchain transaction.

In one embodiment, newly generated blockchain transaction is broadcastto all nodes in the blockchain by a peer-to-peer (P2P) network. The eachnode in the blockchain receives the blockchain transaction by thepeer-to-peer network and stores the blockchain transaction in a localtransaction pool of each node. For example, after any one node in theblockchain generates a new blockchain transaction, the blockchaintransaction is broadcast to all nodes in the blockchain by thepeer-to-peer network. After receiving the blockchain transactionbroadcast by the corresponding node, the each node in the blockchainstores the blockchain transaction in the local transaction pool of eachnode.

The voting module 302 controls the each node to calculate a hash valueof the each node according to the blockchain transaction, generate apackage voting information according to the hash value of the each node,and send the package voting information to a voted node, and the packagevoting information including a digital signature of the each node and anunique identification code of the voted node.

In one embodiment, the blockchain transaction is a transactioncombination including a number of transactions. In one embodiment, dueto transmission delay influence of the P2P network, the blockchaintransaction received by the each node in the blockchain may be the sameor different, that is, the transactions in the transaction combinationreceived by each node in the blockchain may be the same or different. Inone embodiment, when two nodes in the blockchain receive the sameblockchain transaction, the hash values calculated by the two nodes arethe same. When two nodes of the blockchain receive different blockchaintransactions, the hash values calculated by the two nodes are different.

In one embodiment, the voting module 302 calculates the hash value ofeach transaction in the transaction combination received by the eachnode, makes the hash values of the transactions XOR with each other toobtain the hash value of the each node, respectively makes the hashvalue of the each node XOR with an unique identification code of allnodes of the blockchain to obtain XOR distance values between the eachnode and all nodes of the blockchain, determines a minimum XOR distancevalue between the each node and all nodes of the blockchain, takes thenode corresponding to the minimum XOR distance as the voted node in thepackage voting information of the each node, and controls each node tosend the package voting information to the voted node.

For example, the blockchain includes four nodes: node X, node Y, node Zand node U. The unique identification code of node X is 0xF000, theunique identification code of node Y is 0x0F00, the uniqueidentification code of node Z is 0x00F0, and the unique identificationcode of node U is 0x000F, and F represents the number F in hexadecimal.The blockchain transaction includes one or more of the transaction A,the transaction B and the transaction C. The hash value of thetransaction A is calculated as 0x0FFF, the hash value of the transactionB is calculated as 0xF0FF and the hash value of the transaction C iscalculated as 0xFF0F. When the blockchain transaction received by thenode X includes the transaction A, the transaction B and the transactionC, the node X performs XOR operation on the hash values of thetransaction A, the transaction B and the transaction C, that is, 0x0FFF⊕ 0xF0FF ⊕ 0xFF0F to obtain the hash value of the node X as 0x000F. Whenthe blockchain transaction received by the node Y includes thetransaction A, the transaction B and the transaction C, the node Yperforms XOR operation on the hash values of the transaction A, thetransaction B and the transaction C, that is, 0x0FFF ⊕ 0xF0FF ⊕ 0xFF0Fto obtain the hash value of the node Y as 0x000F. When the blockchaintransaction received by the node Z includes the transaction A and thetransaction B, the node Z performs XOR operation on the hash values ofthe transaction A and the transaction B, that is, 0x0FFF ⊕ 0xF0FF toobtain the hash value of the node Y as 0xFF00. When the blockchaintransaction received by the node U includes the transaction B and thetransaction C, the node U performs XOR operation on the hash values ofthe transaction B and the transaction C, that is, 0xF0FF ⊕ 0xFF0F toobtain the hash value of the node U as 0x0FF0. The Node X performs XORoperation on the hash value of the node X with the unique identificationcodes of the node X, the node Y, the node Z and the node U respectively.The XOR distance between the node X and the node X is 61455, the XORdistance between the node X and the node Y is 3855, the XOR distancebetween the node X and the node Z is 255, and the XOR distance betweenthe node X and the node U is 0. As the XOR distance between the node Xand the node U is the smallest, the node X takes the node U as the votednode in the package voting information of the node X, and the node Xsends the package voting information to the node U. The process by whichthe remaining nodes Y, Z and U in the blockchain determine the votednodes in their respective package voting information is the same as thatby which the node x determines the voted nodes in the package votinginformation nodes.

In one embodiment, the voting module 302 controls the each node in theblockchain to calculate the hash value of the each node according to theblockchain transaction within a preset time period, generate the packagevoting information according to the hash value of the each node, andsend the package voting information to the voted node. In oneembodiment, the preset time period is 10 seconds

The vote counting module 303 controls the each node to record the numberof votes as the voted nodes according to the package voting informationto obtain the number of votes of the each node.

In one embodiment, the vote counting module 303 controls the each nodeto generate the package voting information according to the number ofvotes as the voted node, the unique identification code as the votednode and a verification information, and broadcast the package votinginformation to all nodes in the blockchain.

The vote counting module 303 further controls the each node to take thenode with the largest number of votes as a target node according to thenumber of votes.

The packaging module 304 controls the target node to pack the blockchaintransaction into blocks and broadcast the blocks to all nodes in theblockchain.

In one embodiment, the target node packs the blockchain transaction intoblocks and broadcasts the blocks to all nodes in the blockchain by theP2P network.

In the present disclosure, the each node takes the node with the largestnumber of votes as the target node, and the target node packages thereceived blockchain transaction into blocks and broadcasts them to allnodes in the blockchain, so as to avoid a problem that a proof consensusalgorithm consumes a lot of computing resources when determining theblock's packaging authority.

FIG. 3 illustrates the electronic device 6. The electronic device 6includes a storage 61, a processor 62, and a computer program 63 storedin the storage 61 and executed by the processor 62. When the processor62 executes the computer program 63, the blocks in the embodiment of theblock packaging method based on blockchain transaction are implemented,for example, blocks 11 to 15 as shown in FIG. 1. Alternatively, when theprocessor 62 executes the computer program 63, the functions of themodules in the embodiment of the block packaging device are implemented,for example, modules 301-304 shown in FIG. 2.

In one embodiment, the computer program 63 can be partitioned into oneor more modules/units that are stored in the storage 61 and executed bythe processor 62. The one or more modules/units may be a series ofcomputer program instruction segments capable of performing a particularfunction, and the instruction segments describe the execution of thecomputer program 63 in the electronic device 6. For example, thecomputer program 63 can be divided into the transaction receiving module301, the voting module 302, the vote counting module 303 and thepackaging module 304 as shown in FIG. 2.

FIG. 3 shows only one example of the electronic device 6. There are nolimitations of the electronic device 6, and other examples may includemore or less components than those illustrated, or some components maybe combined, or have a different arrangement. The components of theelectronic device 6 may also include input devices, output devices,communication units, network access devices, buses, and the like.

The processor 62 can be a central processing unit (CPU), and alsoinclude other general-purpose processors, a digital signal processor(DSP), and application specific integrated circuit (ASIC),Field-Programmable Gate Array (FPGA) or other programmable logic device,discrete gate or transistor logic device, discrete hardware components,etc. The processor 62 may be a microprocessor or the processor may beany conventional processor or the like. The processor 62 is the controlcenter of the electronic device 6, and connects the electronic device 6by using various interfaces and lines. The storage 61 can be used tostore the computer program 63, modules or units, and the processor 62can realize various functions of the electronic device 6 by running orexecuting the computer program, modules or units stored in the storage61 and calling the data stored in the storage 61.

In one embodiment, the storage 61 may mainly include a program storagearea and a data storage area, wherein the program storage area may storean operating system, an application program (such as a sound playbackfunction, an image playing function, etc.) required for at least onefunction, etc. The data storage area can store data (such as audio data,telephone book, etc.) created according to the use of electronic device6. In addition, the storage 61 may include a high-speed random accessmemory, and may also include a non-volatile memory, such as a hard disk,an internal memory, a plug-in hard disk, a smart media card (SMC), asecure digital (SD) card, a flash card, at least one disk storagedevice, a flash memory device, or other volatile solid state storagedevice

In one embodiment, the modules/units integrated in the electronic device6 can be stored in a computer readable storage medium if suchmodules/units are implemented in the form of a product. Thus, thepresent disclosure may be implemented and realized in any part of themethod of the foregoing embodiments, or may be implemented by thecomputer program, which may be stored in the computer readable storagemedium. The steps of the various method embodiments described above maybe implemented by a computer program when executed by a processor. Thecomputer program includes computer program code, which may be in theform of source code, object code form, executable file, or someintermediate form. The computer readable medium may include any entityor device capable of carrying the computer program code, a recordingmedium, a USB flash drive, a removable hard disk, a magnetic disk, anoptical disk, a computer memory, a read-only memory (ROM), random accessmemory (RAM), electrical carrier signals, telecommunication signals, andsoftware distribution media.

The exemplary embodiments shown and described above are only examples.Even though numerous characteristics and advantages of the presentdisclosure have been set forth in the foregoing description, togetherwith details of the structure and function of the present disclosure,the disclosure is illustrative only, and changes may be made in thedetail, including in matters of shape, size, and arrangement of theparts within the principles of the present disclosure, up to andincluding the full extent established by the broad general meaning ofthe terms used in the claims.

What is claimed is:
 1. A block packaging method based on blockchaintransaction comprising: each node in a blockchain receiving and storinga blockchain transaction; the each node calculating a hash value of theeach node according to the blockchain transaction, generating a packagevoting information according to the hash value of the each node, andsending the package voting information to a voted node, wherein thepackage voting information comprises a digital signature of the eachnode and an unique identification code of the voted node; the each noderecording the number of votes as the voted nodes according to thepackage voting information to obtain the number of votes of the eachnode; the each node taking the node with the largest number of votes asa target node according to the number of votes; and the target nodepacking the blockchain transaction into blocks and broadcasting theblocks to all nodes in the blockchain.
 2. The block packaging method asrecited in claim 1, further comprising: the each node in the blockchainreceiving the blockchain transaction by a peer-to-peer network andstoring the blockchain transaction in a local transaction pool of theeach node.
 3. The block packaging method as recited in claim 1, whereinthe blockchain transaction can be a transaction combination comprising aplurality of transactions.
 4. The block packaging method as recited inclaim 3, further comprising: calculating the hash value of eachtransaction in the transaction combination, and making the hash valuesof the transactions XOR with each other to obtain the hash value of theeach node; respectively making the hash value of the each node XOR withan unique identification code of all nodes of the blockchain to obtainXOR distance values between the each node and all nodes of theblockchain; determining a minimum XOR distance value between the eachnode and all nodes of the blockchain; taking the node corresponding tothe minimum XOR distance as the voted node in the package votinginformation of the each node; and the each node sending the packagevoting information to the voted node.
 5. The block packaging method asrecited in claim 3, further comprising: the each node in the blockchaincalculating the hash value of the each node according to the blockchaintransaction within a preset time period; generating the package votinginformation according to the hash value of the each node; and sendingthe package voting information to the voted node.
 6. The block packagingmethod as recited in claim 3, further comprising: the each nodegenerating the package voting information according to the number ofvotes as the voted node, the unique identification code as the votednode and a verification information; and broadcasting the package votinginformation to all nodes in the blockchain.
 7. The block packagingmethod as recited in claim 1, further comprising: the each node in theblockchain receiving same or different blockchain transaction.
 8. Anelectronic device comprising: a processor; and a non-transitory storagemedium coupled to the processor and configured to store a plurality ofinstructions, which cause the processor to: control each node in ablockchain to receive and store a blockchain transaction; control theeach node to calculate a hash value of the each node according to theblockchain transaction, generate a package voting information accordingto the hash value of the each node, and send the package votinginformation to a voted node, wherein the package voting informationcomprises a digital signature of the each node and an uniqueidentification code of the voted node; control the each node to recordthe number of votes as the voted nodes according to the package votinginformation to obtain the number of votes of the each node; control theeach node to take the node with the largest number of votes as a targetnode according to the number of votes; and control the target node topack the blockchain transaction into blocks and broadcast the blocks toall nodes in the blockchain.
 9. The electronic device as recited inclaim 8, wherein the plurality of instructions are further configured tocause the processor to: control the each node to receive the blockchaintransaction by a peer-to-peer network and store the blockchaintransaction in a local transaction pool of the each node.
 10. Theelectronic device as recited in claim 8, wherein the blockchaintransaction can be a transaction combination comprising a plurality oftransactions.
 11. The electronic device as recited in claim 10, whereinthe plurality of instructions are further configured to cause theprocessor to: calculate the hash value of each transaction in thetransaction combination, and make the hash values of the transactionsXOR with each other to obtain the hash value of the each node;respectively make the hash value of the each node XOR with an uniqueidentification code of all nodes of the blockchain to obtain XORdistance values between the each node and all nodes of the blockchain;determine a minimum XOR distance value between the each node and allnodes of the blockchain; and take the node corresponding to the minimumXOR distance as the voted node in the package voting information of theeach node; and control the each node to send the package votinginformation to the voted node.
 12. The electronic device as recited inclaim 10, wherein the plurality of instructions are further configuredto cause the processor to: control the each node to calculate the hashvalue of the each node according to the blockchain transaction within apreset time period; control the each node to generate the package votinginformation according to the hash value of the each node; and controlthe each node to send the package voting information to the voted node.13. The electronic device as recited in claim 10, wherein the pluralityof instructions are further configured to cause the processor to:control the each node to generate the package voting informationaccording to the number of votes as the voted node, the uniqueidentification code as the voted node and a verification information;and control the each node to broadcast the package voting information toall nodes in the blockchain.
 14. The electronic device as recited inclaim 8, wherein the plurality of instructions are further configured tocause the processor to: control the each node to receive same ordifferent blockchain transaction.
 15. A non-transitory storage mediumhaving stored thereon instructions that, when executed by at least oneprocessor of an electronic device, causes the least one processor toexecute instructions of a block packaging method based on blockchaintransaction, the method comprising: each node in a blockchain receivingand storing a blockchain transaction; the each node calculating a hashvalue of the each node according to the blockchain transaction,generating a package voting information according to the hash value ofthe each node, and sending the package voting information to a votednode, wherein the package voting information comprises a digitalsignature of the each node and an unique identification code of thevoted node; the each node recording the number of votes as the votednodes according to the package voting information to obtain the numberof votes of the each node; the each node taking the node with thelargest number of votes as a target node according to the number ofvotes; and the target node packing the blockchain transaction intoblocks and broadcasting the blocks to all nodes in the blockchain. 16.The non-transitory storage medium as recited in claim 15, wherein theblock packaging method comprising: the each node in the blockchainreceiving the blockchain transaction by a peer-to-peer network andstoring the blockchain transaction in a local transaction pool of theeach node.
 17. The non-transitory storage medium as recited in claim 15,wherein the blockchain transaction can be a transaction combinationcomprising a plurality of transactions.
 18. The non-transitory storagemedium as recited in claim 17, wherein the block packaging methodcomprising: calculating the hash value of each transaction in thetransaction combination, and making the hash values of the transactionsXOR with each other to obtain the hash value of the each node;respectively making the hash value of the each node XOR with an uniqueidentification code of all nodes of the blockchain to obtain XORdistance values between the each node and all nodes of the blockchain;determining a minimum XOR distance value between the each node and allnodes of the blockchain; taking the node corresponding to the minimumXOR distance as the voted node in the package voting information of theeach node; and the each node sending the package voting information tothe voted node.
 19. The non-transitory storage medium as recited inclaim 17, wherein the block packaging method comprising: the each nodein the blockchain calculating the hash value of the each node accordingto the blockchain transaction within a preset time period; generatingthe package voting information according to the hash value of the eachnode; and sending the package voting information to the voted node. 20.The non-transitory storage medium as recited in claim 15, wherein theblock packaging method comprising: the each node generating the packagevoting information according to the number of votes as the voted node,the unique identification code as the voted node and a verificationinformation; and broadcasting the package voting information to allnodes in the blockchain.